package com.cnfol.emoj.util;



import so.shanku.essential.R;

import java.util.ArrayList;
import java.util.List;


public class Expressions {

    public static List<int[]> emojiIdList = new ArrayList<int[]>();
    public static List<String[]> emojiNameList = new ArrayList<String[]>();

    public static final int[] emojID = new int[]{R.drawable.ic_face};

    public static final String[] emojName = new String[]{"[/微笑]"};

    static {
        emojiIdList.add(emojID);
        emojiNameList.add(emojName);
    }

    /**
     * 由表情名称获得表情图片id
     *
     * @param name
     * @return
     */
    public static int getIdAsName(String name) {
        int len1 = emojName.length;
        for (int i = 0; i < len1; i++) {
            if (emojName[i].equals(name)) {
                return emojID[i];
            }
        }
        return 0;
    }

    /**
     *
     * @param key
     * @return
     */
    public static String changeKeys(String key) {
        for (int i = 0; i < emojName.length; i++) {
            if (key.equals(emojName[i])) {
                i++;
                return "emoji_" + i;
            }
        }
        return null;
    }
}
